package com.xt.yncu.common.util;

import java.io.Serializable;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.xt.base.util.SpringUtil;

public class SystemLoaderListener implements ServletContextListener,Serializable{
	private static final long serialVersionUID = -2318670929942718313L;

	public void contextDestroyed(ServletContextEvent arg0) {
	}

	public void contextInitialized(ServletContextEvent arg0) {
		/*初始化字典*/
		WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(arg0.getServletContext());
		SpringUtil.setWebApplicationContext(ctx);
	}

}
